﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OnlineLibrary.Linq.tblUser>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <h2>
        Login</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Form</legend>
        
        <legend><%=ViewData["error"]%></legend>

        <div class="editor-label">
            <label for="UserName">User Name</label>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.UserName)%>
            <%: Html.ValidationMessageFor(model => model.UserName)%>
        </div>

        <div class="editor-label">
            <label for="Password">Password</label>
        </div>
        <div class= "editor-textbox">
            <%: Html.PasswordFor(model => model.PassWord)%>
            <%: Html.ValidationMessageFor(model => model.PassWord)%>
        </div>      

        <p>
            <input type="submit" value="Login" />
        </p>
        
    </fieldset>
    <% } %>
        <div>
            <%: Html.ActionLink("Register new user", "Create", "User")%>
        </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderNavigation" runat="server">
</asp:Content>
